package com.company.project.dao;

import com.company.project.core.Mapper;
import com.company.project.model.Role;
import com.company.project.model.RoleAuthority;
import com.company.project.model.User;
import com.company.project.util.PageUtil;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface RoleMapper extends Mapper<Role> {
    /**
     * 删除角色
     */
    Boolean deleteRole (@Param("rid")Integer rid);
    /**
     * 查询角色和权限
     */
    List<Role> selectRoleWithAuthority(@Param("pageUtil") PageUtil pageUtil);
    /**
     * 数量
     */
    Integer selectRoleUnm();
    /**
     * 更新role
     * @param roleAuthority
     * @return
     */
    Boolean upRole(RoleAuthority roleAuthority);

    /**
     * 查询
     * @return
     */
    List<Role> selectRole();
    /**
     * 添加角色
     */
    Boolean addRole(RoleAuthority roleAuthority);


}